package com.wzy.designpattern.behavioral.observer;

/**
 * 描述
 * 创建人    Wzy
 * 创建时间: 2020-05-16  20:53
 */
public class Test {
    public static void main(String[] args) {
        Course course = new Course("java设计模式");
        Teacher tony = new Teacher("Tony");
        course.addObserver(tony);

        Question question = new Question();
        question.setUserName("tom");
        question.setQuestionContent("java的helloworld怎么编写");
        course.produceQuestion(course, question);
    }
}
